﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private Bitmap GetBitmap(string imagefile)
        {
            var imagebytes = File.ReadAllBytes(imagefile);
            Bitmap savebitmap = new Bitmap(new MemoryStream(imagebytes));
            return savebitmap;
        }
        private void 文件ToolStripMenuItem_Click(object sender, EventArgs e)
        {

            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Multiselect = true;
            ofd.Filter = "图片文件|*.jpg;*.jpeg;*.png;*.bmp;*.emf;*.wmf;*.tif;*.tiff;*.jfif";
            if (ofd.ShowDialog() != DialogResult.OK) return;
            Bitmap bmp = GetBitmap(ofd.FileName);
            imageView1.Image = bmp;
            
        }

        private void imageView1_MouseMove(object sender, MouseEventArgs e)
        {
            
              
            
        }
    }
}
